<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld" %>

<html>
<head><title>Simple jsp page</title>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!--     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> -->
    <script type="text/javascript">
        function invoke(form, event, container) {
            params = {};
            if (event != null) {
                params = event + '&' + $(form).serialize();
            }
            $.post(form.action, params,
                function (xml) {
                    $(container).html(xml);
                }
            );
        }

        $(function() {
            $('input[type=text]').keyup(function() {
                invoke($('form')[0], 'ajax', '#replaceWithAjax');
            });
        });
    </script>
</head>
<body>

<stripes:form beanclass="test2.action.TestActionBean">
    <stripes:text
        name="text"
    >
    </stripes:text>

    <div id="replaceWithAjax">The text you type will replace this text.</div>

    <stripes:submit
        name="submit"
    />
 </stripes:form>

</body>
</html>
